package cn.hy.dataSync.statistics.container.report;

import cn.hy.dataSync.statistics.communication.Communication;
import cn.hy.dataSync.statistics.container.communicator.AbstractContainerCommunicator;

/**
 * 对于job 来说，分成多个任务，
 * job 的统计即任务的合集
 */
public class ProcessInnerReporter extends AbstractReporter {

    private AbstractContainerCommunicator containerCommunicator;

    public ProcessInnerReporter(AbstractContainerCommunicator containerCommunicator) {
        this.containerCommunicator = containerCommunicator;
    }

    @Override
    public void reportJobCommunication(String jobId, Communication communication) {
        // do nothing
    }

    @Override
    public void reportTaskCommunication(Integer taskId, Communication communication) {
        this.containerCommunicator.getCommunicationMap().put(taskId, communication);
    }
}